<script src="<?=STATIC_PATH?>/js/calendar/WdatePicker.js"></script>
<link href="<?=STATIC_PATH?>/js/calendar/skin/WdatePicker.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
    var listjson = <?=$listjson?>;
</script>
<?php $status = array('不要上班','上班');?>
<div class="listDiv" style="height:85%;">
    <table class="listTab" cellpadding="0" cellspacing="0">
        <thead>
        <tr>
            <td width="5%"><span></span>编号</td>
            <td width="20%"><span></span>日期</td>
            <td width="10%"><span></span>上午</td>
            <td width="10%"><span></span>下午</td>
            <td width="10%"><span></span>创建时间</td>
            <td width="15%">操作&nbsp;&nbsp;<a id="add" href="#">[添加特殊安排]</a></td>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($list as $item):?>
        <tr>
            <td><?=$item['id']?>&nbsp;</td>
            <td><span><?=$item['year'].'-'.$item['month'].'-'.$item['day']?>&nbsp;</span></td>
            <td><?=$status[$item['am']]?>&nbsp;</td>
            <td><?=$status[$item['pm']]?>&nbsp;</td>
            <td><?=date("Y-m-d H:i:s", $item['created'])?>&nbsp;</td>
            <td align="left">
                <a id="edit" rel="<?=$item['id']?>" href="#">编辑</a>

                <a id="drop" rel="<?=$item['id']?>" href="#">删除</a>
            </td>
        </tr>
            <?php endforeach;?>
        </tbody>
    </table>
</div>
<div id="add_box" class="hide">
    <form action="/oa/AttendanceArrangeAdd" method="post" id="attendanceArrange_add">
        <input type="hidden" name="id" value="0">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="80px">
            <tr>
                <td width="150px" align="right">&nbsp;选择日期：&nbsp;</td>
                <td><input type="text" style="width: 180px;" name="date" /></td>
            </tr>
            <tr>
                <td width="150px" align="right">&nbsp;上午安排：&nbsp;</td>
                <td>
                    <input type="radio" name="am" checked="checked" value="1">上班
                    &nbsp;
                    <input type="radio" name="am" value="0">不要上班
                </td>
            </tr>
            <tr>
                <td width="150px" align="right">&nbsp;下午安排：&nbsp;</td>
                <td>
                    <input type="radio" name="pm" checked="checked" value="1">上班
                    &nbsp;
                    <input type="radio" name="pm" value="0">不要上班
                </td>
            </tr>
        </table>
    </form>
</div>
<div id="edit_box" class="hide">
    <form action="/oa/attendanceArrangeEdit" method="post" id="attendanceArrange_edit">
        <input type="hidden" name="id" value="0">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="80px">
            <tr>
                <td width="150px" align="right">&nbsp;选择日期：&nbsp;</td>
                <td><input type="text" style="width: 180px;" name="date" /></td>
            </tr>
            <tr>
                <td width="150px" align="right">&nbsp;上午安排：&nbsp;</td>
                <td>
                    <input type="radio" name="am" class="tmp" value="1">上班
                    &nbsp;
                    <input type="radio" name="am" class="tmp" value="0">不要上班
                </td>
            </tr>
            <tr>
                <td width="150px" align="right">&nbsp;下午安排：&nbsp;</td>
                <td>
                    <input type="radio" class="tmp2" name="pm" value="1">上班
                    &nbsp;
                    <input type="radio" class="tmp2" name="pm" value="0">不要上班
                </td>
            </tr>
        </table>
    </form>
</div>


